package org.zero.onlinesubject.service;

import org.springframework.web.multipart.MultipartFile;
import org.zero.onlinesubject.common.param.Chunk;
import org.zero.onlinesubject.common.vo.FileVo;
import org.zero.onlinesubject.common.vo.Result;
import org.zero.onlinesubject.entity.SystemFile;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 *
 */
public interface SystemFileService extends IService<SystemFile> {

    List<FileVo> uploadFile(MultipartFile[] files, String bizId) throws Exception;

    Boolean bigFileUpload(Chunk chunk) throws IOException;

    Boolean deleteFileByBizID(List<String> bizIds) throws ExecutionException, InterruptedException, TimeoutException;

    Boolean deleteFileByFileID(List<String> fileIds) throws ExecutionException, InterruptedException, TimeoutException;

    SystemFile getVideoById(String fileId);

    List<SystemFile> getFileByBizId(String bizId,String fileType);

    Boolean uploadFinish(String bizId,String filename,String md5,Long totalSize,Boolean fromLive);
}
